Python Tutorial 1

Tzer-jen Wei


In [ ]:
import turtle

In [ ]:
turtle.forward(100)

In [ ]:
turtle.right(90)

In [ ]:
turtle.forward(100)

In [ ]:
turtle.shape("turtle")

In [ ]:
turtle.turtlesize(5)

In [ ]:
turtle.goto(50,50)

In [ ]:
turtle.color('green', 'red')

In [ ]:
turtle.forward(300)

In [ ]:
from turtledemo import penrose, peace, planet_and_moon, round_dance, minimal_hanoi
def run(x):
    x.main()
    x.mainloop()

In [ ]:
run(minimal_hanoi)

In [ ]:
penrose.main()
penrose.mainloop()